package com.cwm.test.proxy.autocode.client;

public class JiSuan implements Source {
    @Override
    public int add(int a, int b) {
        System.out.println("加法");
        return a + b;
    }

    @Override
    public int sub(int a, int b) {
        System.out.println("减去");
        return a - b;
    }

    @Override
    public int mul(int a, int b) {
        System.out.println("相乘");
        return a * b;
    }

    @Override
    public int div(int a, int b) {
        System.out.println("除法");
        if (b == 0) {
            throw new IllegalArgumentException("除数不能为零");
        }
        return a / b;
    }
}
